import 'package:json_annotation/json_annotation.dart';

part 'choose_shop_bean.g.dart';

@JsonSerializable()
class ChooseShopBean {
  String categoryCode;
  String categoryImage;
  String categoryImageHover;
  String categoryName;
  String categoryStyleClass;
  String categoryUrl;
  int num;
  bool isChecked = false;
  List<ChildNavigationNodeBean> childNavigationNode;

  ChooseShopBean(
      {this.categoryCode,
      this.num = 0,
      this.categoryImage,
      this.isChecked = false,
      this.categoryImageHover,
      this.categoryName,
      this.categoryStyleClass,
      this.categoryUrl,
      this.childNavigationNode});

  factory ChooseShopBean.fromJson(Map<String, dynamic> json) =>
      _$ChooseShopBeanFromJson(json);

  Map<String, dynamic> toJson() => _$ChooseShopBeanToJson(this);
}

@JsonSerializable()
class ChildNavigationNodeBean {
  String childNodeIcon;
  String childNodeLink;
  String childNodeName;
  String code="100";
  bool isVisible = true;

  ChildNavigationNodeBean(
      {this.childNodeIcon,
      this.childNodeLink,
      this.childNodeName,
      this.code,
      this.isVisible});

  factory ChildNavigationNodeBean.fromJson(Map<String, dynamic> json) =>
      _$ChildNavigationNodeBeanFromJson(json);

  Map<String, dynamic> toJson() => _$ChildNavigationNodeBeanToJson(this);
}
